package com.fz.us.oa.core.entity.com;

import com.fz.us.admin.company.entity.BaseFlowEntity;
import com.fz.us.admin.company.entity.User;
import org.hibernate.annotations.Type;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * Created by dzw on 2017/12/12.
 */
@Entity
@Table(name="sys_modulePower")
public class ModulePower extends BaseFlowEntity {
    private static final long serialVersionUID = -5587059503651553150L;

    /**
     * 用户 creater
     */
    /**
     * 模块名
     */
    private String moduleName;
    /**
     * 表单名
     */
    private String entityName;
    /**
     * 是否是第二次重新申请 0不是 1是
     */
    private int reApply;
    /**
     * 主表（第二次申请时需要替换的）
     */
    private ModulePower modulePower;

    public String getModuleName() {
        return moduleName;
    }

    public void setModuleName(String moduleName) {
        this.moduleName = moduleName;
    }

    @Type(type="text")
    public String getEntityName() {
        return entityName;
    }

    public void setEntityName(String entityName) {
        this.entityName = entityName;
    }

    public int getReApply() {
        return reApply;
    }

    public void setReApply(int reApply) {
        this.reApply = reApply;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    public ModulePower getModulePower() {
        return modulePower;
    }

    public void setModulePower(ModulePower modulePower) {
        this.modulePower = modulePower;
    }
}
